package com.coship.vasms.adstorm.web;

import org.apache.log4j.Logger;

import com.opensymphony.xwork2.ActionContext;
import com.opensymphony.xwork2.ActionSupport;
/**
 * 
 * 
 * File Name    : BaseAction.java
 * @Description 	: 基础action 
 * @author 904120
 */
public class BaseAction extends ActionSupport {

	/**
	 * Description : <Detail Description for package> Author : 904147
	 */
	private static final long serialVersionUID = 1L;
	protected static final Logger log = Logger.getLogger(BaseAction.class);
	// 页号
	protected int pageNo = 1;
	// 每页数量
	protected int pageSize = 10;
	

	/**
	 * @return the startNum
	 */
	public int getStartNum() {
		return (pageNo - 1) * pageSize;
	}

	/**
	 * @return the endNum
	 */
	public int getEndNum() {
		return pageNo * pageSize;
	}

	public String getActionName() {
		return ActionContext.getContext().getName();
	}

	/**
	 * @return the pageNo
	 */
	public int getPageNo() {
		return pageNo;
	}

	/**
	 * @param pageNo
	 *            the pageNo to set
	 */
	public void setPageNo(int pageNo) {
		this.pageNo = pageNo;
	}

	/**
	 * @return the pageSize
	 */
	public int getPageSize() {
		return pageSize;
	}

	/**
	 * @param pageSize
	 *            the pageSize to set
	 */
	public void setPageSize(int pageSize) {
		this.pageSize = pageSize;
	}

}
